<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Dyeable flowers',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2018/10/06.jpg" alt="False cedars between the road and bike path" class="framed-centred-image" width="649" height="480"/>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			I&apos;m sorry to hear you have to deal with that all the time.
			Constantly-cracking skin is a real pain.
			I&apos;ve never gotten cracked feet like that, though when I get bad blisters, it feels like a crack.
			I used to get cracked hands, a condition I inherited from my father, but that seems to have gone away for some reason.
		</p>
		<p>
			Great example of how your situation can be interpreted using the pain gate model!
		</p>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<p>
		It&apos;s going to be ages before I have time to implement this, but I&apos;ve figured out how I want to implement the flower/dye system in Palette game.
		I was a bit stuck before.
		If I went with a palette-based flower, all the flowers would be the same shape, and it&apos;d be boring.
		The great thing about Minetest Game&apos;s flowers is that they vary not only in colour, but also in shape.
		However, if I adopt Minetest Game&apos;s approach, it directly opposes the rest of Palette Game&apos;s everything-uses-a-palette-if-at-all-possible attitude.
		I had no choice but to use the palette-based flowers, even ugly as having only one shape of flower is.
		Today though, I found my alternative.
		There are eight Minetest Game flowers.
		I&apos;ll take each of them and convert it into a palette-based flower.
		Only the expected colour of each flower will spawn naturally, with the exception of the orange flower and purple flower, which will instead spawn in magenta and cyan, because those are the dye colours Palette Game needs access to.
		Once basic dyes are acquired, they can be mixed to form other colours, which is one of the main mechanics of Palette Game.
		With the new dyes, players will be able to dye their flowers if they so choose.
		Will they think to do that?
		I&apos;m not really sure.
	</p>
	<p>
		I might make stone dyeable as well.
		It&apos;s fix the issue I&apos;m having in getting the map generator to spawn different colours of stone by not requiring different colours of stone to be spawned any more.
		The player can just craft the stone colours they need.
		It&apos;s unfortunate, but the current biome $a[API] doesn&apos;t account for palettes, so only palette index <code>0</code> is used during map generation.
		It&apos;s too bad too, as I&apos;d love to have the different colours of stone spawn at different elevations.
		Or at the very least, use the red varient of stone in deserts and the grey version elsewhere, like Minetest Game does by having two stone definitions that use different textures.
		Additionally, having stone be dyable fixes the problem I was having in ore generation.
		I had no way to make one ore look good when spawned in multiple stone types without relying on the palette index to change the stone colour on the mineral nodes, when I already needed the palette index to instead change the mineral colour.
		I thought I was going to need to put only one type of lump mineral and one type of crystal mineral in each coloured layer of stone.
		That wouldn&apos;t be <strong>*so*</strong> bad if not for the fact that the mineral colour would need to match the stone colour due to how the palette was applied by the engine.
		It&apos;d be both ugly and uninspired.
		But if stone is dyeable, only one colour of it will need to spawn naturally.
		And only the naturally-occurring colour of stone will include minerals, so the mineral node&apos;s palette need only be applied to the mineral veins, not the surrounding stone texture.
		Problem solved.
	</p>
</section>
END
);
